3.2.86 \(\int \frac {(a+b x^2)^2}{x^2 (c+d x^2)^2} \, dx\)

Optimal. Leaf size=106 \[ -\frac {x \left (3 a^2 d^2-2 a b c d+b^2 c^2\right )}{2 c^2 d \left (c+d x^2\right )}-\frac {a^2}{c x \left (c+d x^2\right )}+\frac {(b c-a d) (3 a d+b c) \tan ^{-1}\left (\frac {\sqrt {d} x}{\sqrt {c}}\right )}{2 c^{5/2} d^{3/2}} \]

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 106, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {462, 385, 205} \begin {gather*} -\frac {x \left (3 a^2 d^2-2 a b c d+b^2 c^2\right )}{2 c^2 d \left (c+d x^2\right )}-\frac {a^2}{c x \left (c+d x^2\right )}+\frac {(b c-a d) (3 a d+b c) \tan ^{-1}\left (\frac {\sqrt {d} x}{\sqrt {c}}\right )}{2 c^{5/2} d^{3/2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*x^2)^2/(x^2*(c + d*x^2)^2),x]

[Out]

-(a^2/(c*x*(c + d*x^2))) - ((b^2*c^2 - 2*a*b*c*d + 3*a^2*d^2)*x)/(2*c^2*d*(c + d*x^2)) + ((b*c - a*d)*(b*c + 3
*a*d)*ArcTan[(Sqrt[d]*x)/Sqrt[c]])/(2*c^(5/2)*d^(3/2))

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 385

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> -Simp[((b*c - a*d)*x*(a + b*x^n)^(p +
 1))/(a*b*n*(p + 1)), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(a*b*n*(p + 1)), Int[(a + b*x^n)^(p + 1), x], x] /
; FreeQ[{a, b, c, d, n, p}, x] && NeQ[b*c - a*d, 0] && (LtQ[p, -1] || ILtQ[1/n + p, 0])

Rule 462

Int[((e_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^2, x_Symbol] :> Simp[(c^2*(e*x)^(
m + 1)*(a + b*x^n)^(p + 1))/(a*e*(m + 1)), x] - Dist[1/(a*e^n*(m + 1)), Int[(e*x)^(m + n)*(a + b*x^n)^p*Simp[b
*c^2*n*(p + 1) + c*(b*c - 2*a*d)*(m + 1) - a*(m + 1)*d^2*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, p}, x] && Ne
Q[b*c - a*d, 0] && IGtQ[n, 0] && LtQ[m, -1] && GtQ[n, 0]

Rubi steps

\begin {align*} \int \frac {\left (a+b x^2\right )^2}{x^2 \left (c+d x^2\right )^2} \, dx &=-\frac {a^2}{c x \left (c+d x^2\right )}+\frac {\int \frac {a (2 b c-3 a d)+b^2 c x^2}{\left (c+d x^2\right )^2} \, dx}{c}\\ &=-\frac {a^2}{c x \left (c+d x^2\right )}+\frac {\left (2 a b-\frac {b^2 c}{d}-\frac {3 a^2 d}{c}\right ) x}{2 c \left (c+d x^2\right )}+\frac {((b c-a d) (b c+3 a d)) \int \frac {1}{c+d x^2} \, dx}{2 c^2 d}\\ &=-\frac {a^2}{c x \left (c+d x^2\right )}+\frac {\left (2 a b-\frac {b^2 c}{d}-\frac {3 a^2 d}{c}\right ) x}{2 c \left (c+d x^2\right )}+\frac {(b c-a d) (b c+3 a d) \tan ^{-1}\left (\frac {\sqrt {d} x}{\sqrt {c}}\right )}{2 c^{5/2} d^{3/2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.06, size = 91, normalized size = 0.86 \begin {gather*} \frac {\left (-3 a^2 d^2+2 a b c d+b^2 c^2\right ) \tan ^{-1}\left (\frac {\sqrt {d} x}{\sqrt {c}}\right )}{2 c^{5/2} d^{3/2}}-\frac {a^2}{c^2 x}-\frac {x (b c-a d)^2}{2 c^2 d \left (c+d x^2\right )} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*x^2)^2/(x^2*(c + d*x^2)^2),x]

[Out]

-(a^2/(c^2*x)) - ((b*c - a*d)^2*x)/(2*c^2*d*(c + d*x^2)) + ((b^2*c^2 + 2*a*b*c*d - 3*a^2*d^2)*ArcTan[(Sqrt[d]*
x)/Sqrt[c]])/(2*c^(5/2)*d^(3/2))

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (a+b x^2\right )^2}{x^2 \left (c+d x^2\right )^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(a + b*x^2)^2/(x^2*(c + d*x^2)^2),x]

[Out]

IntegrateAlgebraic[(a + b*x^2)^2/(x^2*(c + d*x^2)^2), x]

________________________________________________________________________________________

fricas [A]  time = 0.80, size = 305, normalized size = 2.88 \begin {gather*} \left [-\frac {4 \, a^{2} c^{2} d^{2} + 2 \, {\left (b^{2} c^{3} d - 2 \, a b c^{2} d^{2} + 3 \, a^{2} c d^{3}\right )} x^{2} - {\left ({\left (b^{2} c^{2} d + 2 \, a b c d^{2} - 3 \, a^{2} d^{3}\right )} x^{3} + {\left (b^{2} c^{3} + 2 \, a b c^{2} d - 3 \, a^{2} c d^{2}\right )} x\right )} \sqrt {-c d} \log \left (\frac {d x^{2} + 2 \, \sqrt {-c d} x - c}{d x^{2} + c}\right )}{4 \, {\left (c^{3} d^{3} x^{3} + c^{4} d^{2} x\right )}}, -\frac {2 \, a^{2} c^{2} d^{2} + {\left (b^{2} c^{3} d - 2 \, a b c^{2} d^{2} + 3 \, a^{2} c d^{3}\right )} x^{2} - {\left ({\left (b^{2} c^{2} d + 2 \, a b c d^{2} - 3 \, a^{2} d^{3}\right )} x^{3} + {\left (b^{2} c^{3} + 2 \, a b c^{2} d - 3 \, a^{2} c d^{2}\right )} x\right )} \sqrt {c d} \arctan \left (\frac {\sqrt {c d} x}{c}\right )}{2 \, {\left (c^{3} d^{3} x^{3} + c^{4} d^{2} x\right )}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)^2/x^2/(d*x^2+c)^2,x, algorithm="fricas")

[Out]

[-1/4*(4*a^2*c^2*d^2 + 2*(b^2*c^3*d - 2*a*b*c^2*d^2 + 3*a^2*c*d^3)*x^2 - ((b^2*c^2*d + 2*a*b*c*d^2 - 3*a^2*d^3
)*x^3 + (b^2*c^3 + 2*a*b*c^2*d - 3*a^2*c*d^2)*x)*sqrt(-c*d)*log((d*x^2 + 2*sqrt(-c*d)*x - c)/(d*x^2 + c)))/(c^
3*d^3*x^3 + c^4*d^2*x), -1/2*(2*a^2*c^2*d^2 + (b^2*c^3*d - 2*a*b*c^2*d^2 + 3*a^2*c*d^3)*x^2 - ((b^2*c^2*d + 2*
a*b*c*d^2 - 3*a^2*d^3)*x^3 + (b^2*c^3 + 2*a*b*c^2*d - 3*a^2*c*d^2)*x)*sqrt(c*d)*arctan(sqrt(c*d)*x/c))/(c^3*d^
3*x^3 + c^4*d^2*x)]

________________________________________________________________________________________

giac [A]  time = 0.32, size = 102, normalized size = 0.96 \begin {gather*} \frac {{\left (b^{2} c^{2} + 2 \, a b c d - 3 \, a^{2} d^{2}\right )} \arctan \left (\frac {d x}{\sqrt {c d}}\right )}{2 \, \sqrt {c d} c^{2} d} - \frac {b^{2} c^{2} x^{2} - 2 \, a b c d x^{2} + 3 \, a^{2} d^{2} x^{2} + 2 \, a^{2} c d}{2 \, {\left (d x^{3} + c x\right )} c^{2} d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)^2/x^2/(d*x^2+c)^2,x, algorithm="giac")

[Out]

1/2*(b^2*c^2 + 2*a*b*c*d - 3*a^2*d^2)*arctan(d*x/sqrt(c*d))/(sqrt(c*d)*c^2*d) - 1/2*(b^2*c^2*x^2 - 2*a*b*c*d*x
^2 + 3*a^2*d^2*x^2 + 2*a^2*c*d)/((d*x^3 + c*x)*c^2*d)

________________________________________________________________________________________

maple [A]  time = 0.03, size = 131, normalized size = 1.24 \begin {gather*} -\frac {a^{2} d x}{2 \left (d \,x^{2}+c \right ) c^{2}}-\frac {3 a^{2} d \arctan \left (\frac {d x}{\sqrt {c d}}\right )}{2 \sqrt {c d}\, c^{2}}+\frac {a b x}{\left (d \,x^{2}+c \right ) c}+\frac {a b \arctan \left (\frac {d x}{\sqrt {c d}}\right )}{\sqrt {c d}\, c}-\frac {b^{2} x}{2 \left (d \,x^{2}+c \right ) d}+\frac {b^{2} \arctan \left (\frac {d x}{\sqrt {c d}}\right )}{2 \sqrt {c d}\, d}-\frac {a^{2}}{c^{2} x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x^2+a)^2/x^2/(d*x^2+c)^2,x)

[Out]

-1/2/c^2*d*x/(d*x^2+c)*a^2+1/c*x/(d*x^2+c)*a*b-1/2/d*x/(d*x^2+c)*b^2-3/2/c^2*d/(c*d)^(1/2)*arctan(1/(c*d)^(1/2
)*d*x)*a^2+1/c/(c*d)^(1/2)*arctan(1/(c*d)^(1/2)*d*x)*a*b+1/2/d/(c*d)^(1/2)*arctan(1/(c*d)^(1/2)*d*x)*b^2-a^2/c
^2/x

________________________________________________________________________________________

maxima [A]  time = 2.49, size = 100, normalized size = 0.94 \begin {gather*} -\frac {2 \, a^{2} c d + {\left (b^{2} c^{2} - 2 \, a b c d + 3 \, a^{2} d^{2}\right )} x^{2}}{2 \, {\left (c^{2} d^{2} x^{3} + c^{3} d x\right )}} + \frac {{\left (b^{2} c^{2} + 2 \, a b c d - 3 \, a^{2} d^{2}\right )} \arctan \left (\frac {d x}{\sqrt {c d}}\right )}{2 \, \sqrt {c d} c^{2} d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)^2/x^2/(d*x^2+c)^2,x, algorithm="maxima")

[Out]

-1/2*(2*a^2*c*d + (b^2*c^2 - 2*a*b*c*d + 3*a^2*d^2)*x^2)/(c^2*d^2*x^3 + c^3*d*x) + 1/2*(b^2*c^2 + 2*a*b*c*d -
3*a^2*d^2)*arctan(d*x/sqrt(c*d))/(sqrt(c*d)*c^2*d)

________________________________________________________________________________________

mupad [B]  time = 0.19, size = 128, normalized size = 1.21 \begin {gather*} \frac {\mathrm {atan}\left (\frac {\sqrt {d}\,x\,\left (a\,d-b\,c\right )\,\left (3\,a\,d+b\,c\right )}{\sqrt {c}\,\left (-3\,a^2\,d^2+2\,a\,b\,c\,d+b^2\,c^2\right )}\right )\,\left (a\,d-b\,c\right )\,\left (3\,a\,d+b\,c\right )}{2\,c^{5/2}\,d^{3/2}}-\frac {\frac {a^2}{c}+\frac {x^2\,\left (3\,a^2\,d^2-2\,a\,b\,c\,d+b^2\,c^2\right )}{2\,c^2\,d}}{d\,x^3+c\,x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*x^2)^2/(x^2*(c + d*x^2)^2),x)

[Out]

(atan((d^(1/2)*x*(a*d - b*c)*(3*a*d + b*c))/(c^(1/2)*(b^2*c^2 - 3*a^2*d^2 + 2*a*b*c*d)))*(a*d - b*c)*(3*a*d +
b*c))/(2*c^(5/2)*d^(3/2)) - (a^2/c + (x^2*(3*a^2*d^2 + b^2*c^2 - 2*a*b*c*d))/(2*c^2*d))/(c*x + d*x^3)

________________________________________________________________________________________

sympy [B]  time = 0.87, size = 238, normalized size = 2.25 \begin {gather*} \frac {\sqrt {- \frac {1}{c^{5} d^{3}}} \left (a d - b c\right ) \left (3 a d + b c\right ) \log {\left (- \frac {c^{3} d \sqrt {- \frac {1}{c^{5} d^{3}}} \left (a d - b c\right ) \left (3 a d + b c\right )}{3 a^{2} d^{2} - 2 a b c d - b^{2} c^{2}} + x \right )}}{4} - \frac {\sqrt {- \frac {1}{c^{5} d^{3}}} \left (a d - b c\right ) \left (3 a d + b c\right ) \log {\left (\frac {c^{3} d \sqrt {- \frac {1}{c^{5} d^{3}}} \left (a d - b c\right ) \left (3 a d + b c\right )}{3 a^{2} d^{2} - 2 a b c d - b^{2} c^{2}} + x \right )}}{4} + \frac {- 2 a^{2} c d + x^{2} \left (- 3 a^{2} d^{2} + 2 a b c d - b^{2} c^{2}\right )}{2 c^{3} d x + 2 c^{2} d^{2} x^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x**2+a)**2/x**2/(d*x**2+c)**2,x)

[Out]

sqrt(-1/(c**5*d**3))*(a*d - b*c)*(3*a*d + b*c)*log(-c**3*d*sqrt(-1/(c**5*d**3))*(a*d - b*c)*(3*a*d + b*c)/(3*a
**2*d**2 - 2*a*b*c*d - b**2*c**2) + x)/4 - sqrt(-1/(c**5*d**3))*(a*d - b*c)*(3*a*d + b*c)*log(c**3*d*sqrt(-1/(
c**5*d**3))*(a*d - b*c)*(3*a*d + b*c)/(3*a**2*d**2 - 2*a*b*c*d - b**2*c**2) + x)/4 + (-2*a**2*c*d + x**2*(-3*a
**2*d**2 + 2*a*b*c*d - b**2*c**2))/(2*c**3*d*x + 2*c**2*d**2*x**3)

________________________________________________________________________________________